import Vue from "vue";
import VueRouter from "vue-pages";
import Home from "@/pages/Home.vue";
import GoodsList from "@/pages/GoodsList.vue";
import NewsList from "@/pages/NewsList.vue";
import My from "@/pages/My.vue";
import NoFound from "@/pages/NoFound.vue";
import Login from "@/pages/Login.vue";
import Index from "@/pages/Index.vue";
import Film from "@/pages/Film.vue";
Vue.use(VueRouter);
const router = new VueRouter({
	routes:[
		{
			path:"/",
			component:Index,
			children:[
				{
					// 有导航的
					path:"/",
					component:Home
				},{
					// 有导航的
					path:"/goodsList",
					component:GoodsList
				},{
					// 有导航的
					path:"/newsList",
					component:NewsList
				},{
					// 有导航的
					path:"/my",
					component:My
				},
			]
		},
		{
			path:"*",
			component:NoFound,
			name:"noFound"
		},{
			path:"/login",
			name:"login",
			component:Login,
		},{
			path:"/film",
			name:"film",
			component:Film
		}
	],
	mode:"history"
});
export default router;